package com.zhihui.client.alarm.controller;

import com.zhihui.client.alarm.common.Lay;
import com.zhihui.client.alarm.common.Msg;
import com.zhihui.client.alarm.entity.Shotcutimage;
import com.zhihui.client.alarm.service.ShotcutimageService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
/**
 * 控制器
 * @author zhihuian
 * @email 18037017565@163.com
 * @date 2018/10/29
 */
@Controller
@RequestMapping("/shotcutimage")
public class ShotcutimageController {
    @Resource
    private ShotcutimageService shotcutimageService;

    @RequestMapping
    public String shotcutimage(){
        return "shotcutimage/shotcutimage";
    }
    @RequestMapping("/add")
    public String add(){
        return "shotcutimage/addShotcutimage";
    }

    @RequestMapping("/update")
    public String update(){
        return "shotcutimage/updateShotcutimage.html";
    }

    @RequestMapping("/getShotcutimages")
    @ResponseBody
    public Lay getShotcutimages(Shotcutimage shotcutimage,Integer page,Integer limit){
        return shotcutimageService.getShotcutimages(shotcutimage,page,limit);
    }
    @RequestMapping("/addShotcutimage")
    @ResponseBody
    public Msg addShotcutimage(Shotcutimage shotcutimage){
        return shotcutimageService.addShotcutimage(shotcutimage);
    }

    @RequestMapping("/updateShotcutimage")
    @ResponseBody
    public Msg updateShotcutimage(Shotcutimage shotcutimage){
        return shotcutimageService.updateShotcutimage(shotcutimage);
    }

    @RequestMapping("/delShotcutimage")
    @ResponseBody
    public Msg delShotcutimage(Shotcutimage shotcutimage){
        return shotcutimageService.delShotcutimage(shotcutimage);
    }
}
